/**
 * 
 */
package clientApp;

import java.util.ArrayList;

/**
 * @author Wesley
 *
 */
public class TestDriver3 {
	public static void main(String[] args)
	{
	VirtualAdvisor myVA = new VirtualAdvisor();
	ArrayList<Course> catalog = myVA.getAllCourses();
	//works; courses output correctly
	for(Course course : catalog)
		System.out.println("Course: " + course.toString());
	myVA.userLogin(new Student("Test", "Test", "Student", ProjectConstants.CMSC), false);
	//Works; returns nothing as expected
	ArrayList<String> plannames = myVA.getPlanNames();
	for(String plan : plannames)
		System.out.println("Plannames: " + plan);
	myVA.addPlan(new Plan("New"));
	//Works; returns the plan New
	plannames = myVA.getPlanNames();
	for(String plan : plannames)
		System.out.println("Plannames2: " + plan);
	//works; null pointer exception
	//myVA.addSemesterToPlan("fake", new Semester(null));
	//breaks; fake plan does not exist, new semesters do not show up
	myVA.addSemesterToPlan("fake", new Semester(2, 1));
	myVA.addSemesterToPlan("fake", new Semester(ProjectConstants.FALL, 2011));
	//works; null pointer
	ArrayList<String> semNames = myVA.getAllSemesterTitlesInPlan("fake");
	for(String temp : semNames)
		System.out.println("sem: " + temp);
	//break; correctly id's issue but added anyway
	myVA.addSemesterToPlan("New", new Semester(2, 1));
	myVA.addSemesterToPlan("New", new Semester(ProjectConstants.FALL, 2011));
	semNames = myVA.getAllSemesterTitlesInPlan("New");
	for(String temp : semNames)
		System.out.println("sem: " + temp);
	plannames = myVA.getPlanNames();
	for(String plan : plannames)
		System.out.println("Plannames2: " + plan);
	myVA.userLogin(new Admin("Test", "Test", "Admin"), true);
	plannames = myVA.getPlanNames();
	//worked; threw null pointer exception
	for(String plan : plannames)
		System.out.println("Plannames3: " + plan);

	}
}
